﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;

namespace WarOfDev.AutoTasks
{
    public class TaskEntity
    {
        public string Name { get; set; }
        public int Interval { get; set; }
        public string ExecutorType { get; set; }
        public IExecutable Executor { get; set; }

        public void timer_Elapsed(object sender,ElapsedEventArgs e)
        {
            if (Executor != null)
            {
                Executor.Execute();
            }
        }
    }
}
